﻿using System.ComponentModel;
using SF.Code.Extension.BusinessHelper;
using SG.Ling.AutoTranslator.Common;

namespace SG.Ling.AutoTranslator.Translation
{
    public class UserFormSettings
    {
        public UserFormSettings()
        {
            ShowBalloon = true;
        }

        public int SourceLanguage { get; set; }

        public int TargetLanguage { get; set; }

        public int Hits { get; set; }

        public int Misses { get; set; }

        public bool AutoClipboard { get; set; }

        public bool ShowBalloon { get; set; }

        public static UserFormSettings ReadFromAppData()
        {
            return XmlSettings.ReadFromAppData<UserFormSettings>();
        }

        public void WriteToAppData()
        {
            XmlSettings.WriteToAppData(this);
        }
    }
}
